package net.zhengxinyun.performance.service.login;

import net.zhengxinyun.performance.entity.TokenEntity;
import net.zhengxinyun.performance.entity.UserEntity;
import net.zhengxinyun.performance.filter.UserFilter;

/**
 * @Auther: hyp
 * @Date: 2018/10/30 14:52
 */
public interface LoginService {

    /**
     * 验证账户密码，正确返回token给前端
     * @param UserFilter
     * @return
     */
    TokenEntity loginGetToken(UserFilter userFilter) throws Exception;

    /**
     * 验证token，返回用户信息
     * @param tokenEntity
     * @return
     */
    UserEntity getUserByToken(TokenEntity tokenEntity);

    /**
     * 退出登录
     * @param tokenEntity
     */
    void exit(TokenEntity tokenEntity);
}
